# $Id: PKGBUILD 184241 2013-05-04 20:06:54Z heftig $
# Maintainer: Ionut Biru <ibiru@archlinux.org>

pkgname=gcr
pkgver=3.8.2
pkgrel=1
pkgdesc="A library for bits of crypto UI and parsing"
arch=(i686 x86_64)
url="http://www.gnome.org"
license=('GPL2')
depends=('dconf' 'desktop-file-utils' 'gtk3' 'hicolor-icon-theme' 'libgcrypt')
makedepends=('intltool' 'gobject-introspection' 'python')
options=(!libtool)
install=gcr.install
source=(http://download.gnome.org/sources/$pkgname/${pkgver::3}/$pkgname-$pkgver.tar.xz
        10-gcr.conf)
sha256sums=('a1e615ce2cfd375f383bbdd289935a8e3e16901c3c6f032780847055e8bec2c1'
            '5f2eda7175ae9f23ee0e09d2beceb24fd2f6daafd7bddfcc1c1f5a3734eb60fc')

build() {
  cd "$pkgname-$pkgver"
  ./configure --prefix=/usr \
    --libexec=/usr/lib/gcr \
    --disable-static \
    --disable-update-mime \
    --disable-schemas-compile
  make
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install

  # gcr wants to lock some memory to prevent swapping out private keys
  # https://bugs.archlinux.org/task/32616
  # https://bugzilla.gnome.org/show_bug.cgi?id=688161
  install -Dm644 ../10-gcr.conf "$pkgdir/etc/security/limits.d/10-gcr.conf"
}

# vim:set ts=2 sw=2 et:
